import {Component, Prop, Vue} from 'vue-property-decorator'
import btnResetPrint from './btn_reset_print.tsx'
import {store} from '@/store/index'


const _vue:any = new Vue();

@Component({})
export default class btnIntimidate extends btnResetPrint{
    name:string = 'btn-intimidate'

    get disabled(){
        return this.singleStatus !== '已集印'
    }

    clickFn (){

        // 提交当前操作项目(请求中间件将抽取请求参数)
        this.commitCurrentSingle(this.mod.key);
        
        // 提交本地请求
        store.dispatch('request', {
            url: 'post/intimidate/id',
            data:{}
        }).then(success =>{

            if(success){
                _vue.$Notice.success({
                    title: '打单成功'
                })
            }
            
        })

    }
    
}

